#!/usr/bin/env python
import multiprocessing
import time
import commands

class ClockProcess(multiprocessing.Process):
    def __init__(self, cmd):
        multiprocessing.Process.__init__(self)
        self.cmd = cmd

    def run(self):
        cmd_status,cmd_result = commands.getstatusoutput(self.cmd) 
        if len(cmd_result.strip()) != 0:
            print cmd_result
            print cmd_status
        else:
            print "Done"

if __name__ == '__main__':
    p = ClockProcess('dasd')
    p.start()      
    print "pid:",p.pid
    print "p.name:", p.name
    print "p.is_alive:", p.is_alive()
